/*
 * #%L
 * java model
 * %%
 * Copyright (C) 2009 - 2011 prefabware.com Stefan Isele
 * %%
 * All Rights Reserved.
 * This program is dual-licensed under the GNU General Public license
 * or a commercial license.
 * You may select to use one or the other of these licenses.
 * To obtain a commercial license please contact Stefan Isele at www.stefan-isele.de
 * Any modifications to this file must keep this entire header intact.
 * Redistribution, except as permitted by the selected license, is prohibited.
 * #L%
 */
package com.prefabware.jmodel.code;

import java.util.List;

import com.prefabware.commons.QualifiedName;
import com.prefabware.jmodel.JType;

public interface JCodeOptions {
	/**
	 * @return true = names of types will allways be qualified with their
	 *         package name, e.g java.lang.String false = names of types will
	 *         allways be simple names, e.g. String
	 */
	public boolean isUseQualifiedNames();
	
	/**
	 * 
	 * @param qualifiedName
	 * @return the qualifiedName as code according to {@link #isUseQualifiedNames()}
	 * 		   if {@link #isUseQualifiedNames()}==true returns {@link QualifiedName#getName()}
	 *         if {@link #isUseQualifiedNames()}==false returns {@link QualifiedName#getSimpleName()}
	 */
	public String asCode(QualifiedName qualifiedName);
	public String toCsv(List<JType> types);
	//TODO isJava() to decide when to use e.g. this for fields
	public static JCodeOptions DEFAULT = new JCodeOptionsDefault();
	public static JCodeOptions SIMPLE_NAMES = new JCodeOptionsShortNames();
}
